<?php
/**
 * appRain CMF
 *
 * LICENSE
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.opensource.org/licenses/mit-license.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@apprain.com so we can send you a copy immediately.
 *
 * @copyright  Copyright (c) 2010 appRain, Team. (http://www.apprain.com)
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 *
 * HELP
 *
 * Official Website
 * http://www.apprain.com/
 *
 * Download Link
 * http://www.apprain.com/download
 *
 * Documents Link
 * http ://www.apprain.com/docs
 */

echo $this->get_tag("form", array("method"=>"post","action"=>$this->baseurl("/member/change-password")));

App::Helper('Toolbar')->setTitle("Change Password")->setBtnSave()->setBtnBack()->Render(array('code'=>'change_password_top'));
if( !empty($message)){ echo $this->callElement('default/tools/message', array('caption' =>'Message','type' => $message['type'], 'message' => $message['msg']));}
$Grid = App::Module('DataGrid')
           ->setDisplay('FormListing')
           ->addRow( "Old password", App::Load("Helper/Html")->passwordTag("data[Member][old_password]","",array("id"=>"old_password","class"=>"app_input check_notempty") ))
           ->addRow("New password", App::Load("Helper/Html")->passwordTag("data[Member][new_password]","",array("id"=>"old_password","class"=>"app_input check_notempty") ))
           ->addRow("Confirm password", App::Load("Helper/Html")->passwordTag("data[Member][re_new_password]","",array("id"=>"old_password","class"=>"app_input check_notempty")))
           ->Render();
App::Helper('Toolbar')->setBtnSave()->setFormJustified(true)->setBtnBack()->Render(array('code'=>'change_password_bottom'));    

App::Helper('JavaScript')->appForm('form');
echo $this->get_tag("/form");